package com.struct.graph.server_list
{
	import com.collection.ACollection;
	import com.collection.FactoryCollection;
	import com.events.ServerListSelectEvent;
	
	import flash.display.DisplayObjectContainer;
	
	import sacu.s.worker.GraphWorker;
	
	public class ServerListGraphWorker extends GraphWorker
	{
		private var _base:ServerListFrame;
		public function ServerListGraphWorker(id:String, base:DisplayObjectContainer)
		{
			super(id, base);
			_base = base as ServerListFrame;
			
			_base.addEventListener(ACollection.SELECTED, selectedHandler);
		}
		
		private function selectedHandler(e:ServerListSelectEvent):void{
			factory.disposeFactory();
			FactoryCollection.roomList.startFactory();
		}
	}
}